package aor2.assembly;

import java.util.ArrayList;
import java.util.Iterator;

public class TestClass3 {

	public static void main(String[] args) {
		Assembler code = new Assembler();

		ArrayList<Long> list = code.instruction("JMPIND R7++");
		Iterator<Long> iter = list.iterator();
		while (iter.hasNext()) {
			System.out.println(Long.toHexString(iter.next() & 0xFFFF));
		}
		System.out.println("====================");
		System.out.println("====================");
		/*
		 * list = code.instruction("MOV R6+0 R7-0"); iter = list.iterator();
		 * while(iter.hasNext()){
		 * System.out.println(Long.toHexString(iter.next()&0xFFFF)); }
		 * System.out.println("====================");
		 * 
		 * list = code.instruction("MOV R6+76 [R7-1]"); iter = list.iterator();
		 * while(iter.hasNext()){
		 * System.out.println(Long.toHexString(iter.next()&0xFFFF)); }
		 */System.out.println("====================");

		list = code.instruction("MOV R6++ [R7-1]");
		iter = list.iterator();
		while (iter.hasNext()) {
			System.out.println(Long.toHexString(iter.next() & 0xFFFF));
		}
		System.out.println("====================");

		list = code.instruction("MOV R6-- [R7-1]");
		iter = list.iterator();
		while (iter.hasNext()) {
			System.out.println(Long.toHexString(iter.next() & 0xFFFF));
		}
		System.out.println("====================");

		list = code.instruction("MOV [R6++] [R7-1]");
		iter = list.iterator();
		while (iter.hasNext()) {
			System.out.println(Long.toHexString(iter.next() & 0xFFFF));
		}
		System.out.println("====================");

		list = code.instruction("MOV [R6--] [R7-1]");
		iter = list.iterator();
		while (iter.hasNext()) {
			System.out.println(Long.toHexString(iter.next() & 0xFFFF));
		}
		System.out.println("====================");

		list = code.instruction("MOV R7+123 [R7-123]");
		iter = list.iterator();
		while (iter.hasNext()) {
			System.out.println(Long.toHexString(iter.next() & 0xFFFF));
		}
	}
}
